import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import '@/assets/style/reset.css'
import Popup from '@/components/popup/index'
import Toast from '@/components/toast/index.jsx'
import Messager from '@/utils/message.js'
import VConsole from 'vconsole';

// if (process.env.NODE_ENV === 'development')
  new VConsole();


const app = createApp(App)
  .use(router)
  .use(Popup)
  .use(Toast)
  .mount('#app')

const setRem = () => {
  document.querySelector('html').style.fontSize = window.screen.availWidth / 7.5 + 'px'
}

window.onresize = setRem;
setRem()
window.requestLocation = new Messager ().requestLocation
window.responseLocation = new Messager ().responseLocation


